package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户评论对象 comment
 * 
 * @author ruoyi
 * @date 2025-05-29
 */
@Data
public class Comment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private String id;

    /** 关联景点id */
    @Excel(name = "关联景点id")
    private String aid;

    /** 评论用户id */
    @Excel(name = "评论用户id")
    private String uid;

    /** 评论内容 */
    @Excel(name = "评论内容")
    private String content;

    /** 评分星级（1-5星） */
    @Excel(name = "评分星级", readConverterExp = "1=-5星")
    private Long star;

    /** 评论发布时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "评论发布时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date time;

    /** 评论附带图片 */
    @Excel(name = "评论附带图片")
    private String imgUrl;

    private String nickName;


    /** 评论状态（1=显示，0=隐藏） */
    @Excel(name = "评论状态", readConverterExp = "1==显示，0=隐藏")
    private Long state;

    private String avatar;
    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }

    public void setAid(String aid) 
    {
        this.aid = aid;
    }

    public String getAid() 
    {
        return aid;
    }

    public void setUid(String uid) 
    {
        this.uid = uid;
    }

    public String getUid() 
    {
        return uid;
    }

    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }

    public void setStar(Long star) 
    {
        this.star = star;
    }

    public Long getStar() 
    {
        return star;
    }

    public void setTime(Date time) 
    {
        this.time = time;
    }

    public Date getTime() 
    {
        return time;
    }

    public void setImgUrl(String imgUrl) 
    {
        this.imgUrl = imgUrl;
    }

    public String getImgUrl() 
    {
        return imgUrl;
    }

    public void setState(Long state) 
    {
        this.state = state;
    }

    public Long getState() 
    {
        return state;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("aid", getAid())
            .append("uid", getUid())
            .append("content", getContent())
            .append("star", getStar())
            .append("time", getTime())
            .append("imgUrl", getImgUrl())
            .append("state", getState())
            .toString();
    }
}
